# 闯关答题比赛

print("闯关开始了，输入q可退出。")
c=0
for i in range(1, 4):
    if i == 1:
        print(f"题目{i}是1+1=？")
        print("有三次作答机会,输入q可直接退出")
        text = int(input("输入数字"))
        while c<4:
            if text == 2:
                print("恭喜进入下一关")
                break
            elif str(text) == 'q':
                break

        c+=1

        #
        #
        # for c in range(1, 4):
        #     if text == 2:
        #         print("恭喜进入下一关")
        #         break
        #     elif str(text) == 'q':
        #         break
        #     else:
        #         text = int(input("输入数字"))


    elif i == 2:
        print(f"题目{i}是2+3=？")
        print("有三次作答机会")
        text = int(input("输入数字"))
        for c in range(3, 0):
            if text == 5:
                print("恭喜进入下一关")
                break
            elif str(text) == 'q':
                break


    else:
        print(f"题目{i}是1+5=？")
        print("有三次作答机会")
        text = int(input("输入数字"))
        for c in range(1, 4):
            if text == 6:
                print("过关了")
                break
            elif str(text) == 'q':
                break

